Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

Addresses feedback from #40 to use modern union syntax for type annotations instead of typing.Optional.

Changes

  • Replace Optional[InvoiceRequest] with InvoiceRequest | None in app/routers/operator.py:298
  • Remove unused typing.Optional import

Example

# Before
from typing import Optional

async def invoice(
    invoice_id: str = Path(...),
    data: Optional[InvoiceRequest] = None,
    _current_user: User | None = current_user_flexible_dep,
) -> InvoiceResponse:
    ...

# After
async def invoice(
    invoice_id: str = Path(...),
    data: InvoiceRequest | None = None,
    _current_user: User | None = current_user_flexible_dep,
) -> InvoiceResponse:
    ...

Aligns with project's Python 3.11+ requirement where PEP 604 union syntax is standard.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update to address feedback on hotfix CI precommit refactor: modernize type hints to Python 3.10+ union syntax Oct 30, 2025
Copilot AI requested a review from Neiland85 October 30, 2025 14:59
@Neiland85
Copy link
Owner

Closing this PR. After the 2025 refactor, these changes are fully superseded and incompatible with the new system design.

Keeping it open offers no benefit and only adds unnecessary clutter to the repository.

@Neiland85 Neiland85 closed this Dec 10, 2025
@Neiland85 Neiland85 deleted the copilot/sub-pr-40-again branch December 10, 2025 16:51
Neiland85 added a commit that referenced this pull request Dec 13, 2025
- Remove unused typing imports: Any, Dict, List
- Remove unused HTTPException from fastapi
- Remove unused JSONResponse from fastapi.responses

Fixes CodeQL alerts #21, #42, #43
Neiland85 added a commit that referenced this pull request Dec 13, 2025
Removes:
- typing.Any, typing.Dict, typing.List (unused)
- fastapi.HTTPException (unused)
- fastapi.responses.JSONResponse (unused)

Closes CodeQL alerts #21, #42, #43
Neiland85 added a commit that referenced this pull request Dec 13, 2025
Removes:
- typing.Any, typing.Dict, typing.List (unused)
- fastapi.HTTPException (unused)
- fastapi.responses.JSONResponse (unused)

Closes CodeQL alerts #21, #42, #43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants